package cn.qiyu5522.tk_ems.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * @ProjectName: tk_ems
 * @Package: cn.qiyu5522.tk_ems.entity.vo
 * @ClassName: QueyrParamVo
 * @Author: [Lucky Star]
 * @Date: 2023/2/3 20:47
 * @Version: V1.0
 **/
@ApiModel("条件查询模型对象")
@Data
public class QueryParamDTO<T> {
    @ApiModelProperty(value = "当前页",name ="currentPage" )
    @NotNull(message = "当前页数不能为空",groups = {QueryParamDTO.Query.class})
    @Range(min = 1L,message = "当前页不能小于0")
    private Integer currentPage;

    @ApiModelProperty(value = "每页显示记录条数",name ="pageSize")
    @NotNull(message = "每页显示的记录数不能为空",groups = {QueryParamDTO.Query.class})
    @Range(min = 1L,message = "每页显示的记录数不能小于1")
    private Integer pageSize;

    private T condition;

    public interface Query {}
}
